;(function(){
	this.UsersService = function(){
		/**
		 *  页面初始化+分页查询+ 条件查询
		 */
		this.findBean = function(user){
			var set = {url:"init.do"}
			if(user){
				set.data = user;
			}
			return new BaseDAO(set).getServiceData();
		}
		/**
		 *  页面新增
		 */
		this.save= function(user){
			var set = {url:"save.do",data:user.serialize()};
			return new BaseDAO(set).getServiceData();
		}
		/**
		 * 查询单个事件
		 */
		this.findBy = function(id){
			var set = {url:"findbyid.do",data:{id:id}};
			return new BaseDAO(set).getServiceData();
		}
		/**
		 *  修改事件
		 */
		this.btnUp = function(user){
			var set = {url:"update.do",data:user.serialize()};
			alert("1");
			return new BaseDAO(set).getServiceData();
		}
	}
})(jQuery);
